package core.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This Annotation binds a variable form java to a field name from
 * HTML Form
 *
 * @author Sergiu
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface FieldName {

    /**
     * The name of field on the HTML form.
     *
     * @return String the field name.
     */
    String value();

    /**
     * Method of naming fields. Can start or end with the string from value. The
     * part which is added to the String present in value, will be the key in
     * the map.
     *
     * @return
     */
    MapCondition mapCondition() default MapCondition.NONE;
}
